home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 January to June / Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64 / interrupt music (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  19KB  |  513 lines

  1. 0 rem--ahoy--jan issue--interrupt music--prog page 21
  2. 1 remnants of my old piano...  (c) 1983 by pete lobl river city,  u.s.a.
  3. 4 onqqgoto50
  4. 5 poke52,89:poke56,89:clr:h=1:poke53280,0:poke53281,0
  5. 7 printchr$(8):gosub10000:i=-rnd(ti)
  6. 8 print"want to reset the clocks?(y/n)";:gosub5310:ifleft$(in$,1)<>"y"then20
  7. 9 fori=56331to56238step-1:pokei,0:next:fori=56587to56584step-1:pokei,0:next
  8. 20 a=peek(56328):b=peek(56584):print"please wait, reading in data..."
  9. 21 dimo1%(12),o2%(12),o3%(12),o4%(12),o5%(12),o6%(12),o7%(12),o8(12)
  10. 23 dimn$(15):fori=1to15:readn$(i):next
  11. 24 diml$(5):fori=1to5:readl$(i):next
  12. 25 dimns$(12):fori=1to12:readns$(i):next
  13. 26 dimnf$(12):fori=1to12:readnf$(i):next
  14. 27 dimnu(15):fori=1to15:readnu(i):next
  15. 28 fori=54272to54296:pokei,0:next
  16. 30 fori=1to12:reado1%(i):next
  17. 31 fori=1to12:reado2%(i):next
  18. 32 fori=1to12:reado3%(i):next
  19. 33 fori=1to12:reado4%(i):next
  20. 34 fori=1to12:reado5%(i):next
  21. 35 fori=1to12:reado6%(i):next
  22. 36 fori=1to12:reado7%(i):next
  23. 37 fori=1to12:reado8(i):next
  24. 40 v1=6*4096-1:v2=8*4096-1:t=0:o=5:n=1:f1=8192:f2=f1:v=1:b1=v:b2=v:a1=0:a2=a1
  25. 41 sy=5*4096+10*256+48:ys=5*4096+10*256+48+11:n2=n:sp=57:c1=23124:c2=c1+41
  26. 42 s$="short ":l$="tied ":l$(0)="length =":q$=""
  27. 45 o2=o:t2=t:n2=n
  28. 47 fori=22784to23205:reada:pokei,a:next
  29. 50 ifv=2 then240
  30. 51 print"[147]blocks free";int(f1/3);"     :  :";
  31. 52 print"       voice 1":sysc1
  32. 53 print"position"tab(16)n;tab(22)n+1;tab(28)n+2
  33. 55 print"values"tab(16)peek(n+v1)"  "peek(n+v1+1)"  "peek(n+v1+2)
  34. 58 print"meaning"tab(10);:a=peek(n+v1):b=peek(n+v1+1):c=peek(n+v1+2)
  35. 60 ifa=0thenprint"at/dec ="b"sus/rel ="c:goto100
  36. 63 j=0:fori=1to15:ifa=nu(i)thenj=i
  37. 64 next:ifj=0thenprintl$(0)a;:goto80
  38. 66 z=int(j/3):y=j-z*3:ifythenz=z+1
  39. 67 ify=1thenprints$;
  40. 68 ify=0thenprintl$;
  41. 69 printl$(z)" ";
  42. 80 j=b*256+c:fori=1to12:ifj=o1%(i)thena=1:b=i:goto90
  43. 82 ifj=o2%(i)thena=2:b=i:goto90
  44. 83 ifj=o3%(i)thena=3:b=i:goto90
  45. 84 ifj=o4%(i)thena=4:b=i:goto90
  46. 85 ifj=o5%(i)thena=5:b=i:goto90
  47. 86 ifj=o6%(i)thena=6:b=i:goto90
  48. 87 ifj=o7%(i)thena=7:b=i:goto90
  49. 88 ifj=o8(i)thena=8:b=i:goto90
  50. 89 next:ifj>0thenprint" ? note":goto100
  51. 90 i=13:ifj=0thenprint" rest":goto100
  52. 92 next:printa;:in$=ns$(b):a$=nf$(b):ifa$=in$thenprinta$:goto100
  53. 94 printin$" ("a$")"
  54. 100 print""
  55. 102 print"l[146]=load s[146]=save g[146]=goto n[146]=next b[146]=back"
  56. 104 print"c[146]=change p[146]=play t[146]=transfer f[146]=find ?[146]=dump"
  57. 105 print"h[146]=help z[146]=speed v[146]=volume e[146]=edit"
  58. 106 print"current block ="b1
  59. 108 print"octave "o"    tempo "t"   speed "sp
  60. 110 a$="":print"input : ";:h=.:gosub5310:h=1:a$=in$
  61. 111 ifleft$(a$,1)="h"ora$="*h"thengosub7000:goto50
  62. 112 ifleft$(a$,1)="*"then141
  63. 113 a=val(left$(a$,1)):ifathengosub422:o=a:goto116
  64. 114 b$=left$(a$,2):ifright$(b$,1)=" "thenb$=left$(b$,1)
  65. 115 goto117
  66. 116 b$=mid$(a$,2,2):ifright$(b$,1)=" "thenb$=left$(b$,1)
  67. 117 j=0:fori=1to12:ifb$=ns$(i)thenj=i
  68. 118 next:ifjthen122
  69. 119 j=0:fori=1to12:ifb$=nf$(i)thenj=i
  70. 120 next:ifjthen122
  71. 121 goto402
  72. 122 onogosub400,410,420,430,440,450,460,470
  73. 123 b=int(a/256):c=a-b*256:pokev1+n+1,b:pokev1+n+2,c
  74. 124 j=o:fori=1tolen(a$):ifmid$(a$,i,1)=" "thenj=i
  75. 125 next:a$=right$(a$,len(a$)-j):j=0:fori=1to15:ifa$=n$(i)thenj=i
  76. 126 next:ifj=0thend=val(a$):goto128
  77. 127 d=nu(j):goto130
  78. 128 ifd>255thenprintq$;"duration too large !!":gosub8000:goto50
  79. 129 ifd<=0thenprintq$;"duration can't be less than 1 !!":gosub8000:goto50
  80. 130 d=d+t:ifd>255ord<=0then128
  81. 131 poken+v1,d:b1=b1+1:n=n+3:f1=f1-3
  82. 132 iff1<1thenprintq$"all blocks full for voice 1":gosub8000:goto426
  83. 133 ifright$(a$,1)="h"orright$(a$,2)="h "then461
  84. 134 ifval(a$)then138
  85. 135 ifright$(a$,1)="s"orright$(a$,2)="s "then471
  86. 136 poken+v1,1:poken+v1+1,0:poken+v1+2,0:goto140
  87. 137 poken+v1+2,0:goto140
  88. 138 ifa1=0then50
  89. 139 poken+v1,a1:poken+v1+1,0:goto137
  90. 140 b1=b1+1:n=n+3:f1=f1-3:goto424
  91. 141 a$=right$(a$,1):ifa$<>"g"then144
  92. 142 printq$"to what block ? ";:gosub5310:j=val(in$):ifj>2830orj<1then50
  93. 143 b1=j:f1=8193-b1*3:n=b1*3-2:goto50
  94. 144 ifa$<>"n"then147
  95. 145 j=b1:j=j+1:ifj<2831then143
  96. 146 goto50
  97. 147 ifa$<>"b"then150
  98. 148 j=b1:j=j-1:ifj>0then143
  99. 149 goto50
  100. 150 ifa$<>"l"then152
  101. 151 goto4000
  102. 152 ifa$<>"p"then165
  103. 153 ifp=1thensys5*4096+9*256+15*16+10:poke54296,0:p=0:goto50
  104. 154 print"[147]which voices do you want ? (1/2/b) ";:gosub5310:a$=in$
  105. 155 qq=5*4096+9*256:ifa$="2"thenpokeqq+68,0:pokeqq+109,0:pokeqq+21,0:goto160
  106. 156 print"what waveform for voice 1 ? (t/s/p/n) ";:gosub5310:a1=1:gosub433
  107. 157 pokeqq+68,wv:pokeqq+109,wv:pokeqq+21,wv-1
  108. 158 print"what block does it start at ? ";:gosub5310:vv=1:gosub452
  109. 159 ifa$="1"thensysqq+12*16:p=1:pokeqq+114,0:pokeqq+85,0:goto50
  110. 160 print"what waveform for voice 2 ? (t/s/p/n) ";:gosub5310:a1=2:gosub433
  111. 161 pokeqq+114,wv:pokeqq+85,wv-1
  112. 162 print"what block does it start at ? ";:gosub5310:vv=2:gosub452
  113. 163 sysqq+12*16:p=1:goto50
  114. 165 ifa$<>"c"then185
  115. 166 print"[147]your choice ? (v/t/dsr/au/ti/fs/x) ";:gosub5310:ifin$="x"then50
  116. 167 ifin$="t"thenprint"tempo ";:gosub5310:t=val(in$):goto166
  117. 168 ifin$="dsr"thenprint"attack/decay ? ";:gosub5310:a=val(in$):goto170
  118. 169 goto172
  119. 170 print"sustain/release ? ";:gosub5310:sr=val(in$):ifa>255orsr>255then166
  120. 171 poken+v1,0:poken+v1+1,a:poken+v1+2,sr:b1=b1+1:n=n+3:f1=f1-3:goto166
  121. 172 ifin$="v"thenv=v+1:v=v+2*(v=3):goto166
  122. 173 ifin$="au"thenprint"your new seperation ? ";:gosub5310:a1=val(in$):goto166
  123. 174 ifin$<>"fs"then473
  124. 175 print"[147]starting block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  125. 176 j=val(in$)-a:ifa<1then166
  126. 177 print"slower or faster ? (s/f) ";:gosub5310:ifin$="s"thenr=2:k=1:goto179
  127. 178 r=.5:k=0
  128. 179 qq=6*4096+a*3-3:fori=qqtoqq+j*3step3:ifpeek(i)<2then182
  129. 180 a=int(peek(i)*r)+k:ifa>255thena=255
  130. 181 pokei,a
  131. 182 next:goto166
  132. 185 ifa$<>"t"then195
  133. 186 print"[147]begining block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  134. 187 b=val(in$):print"origin voice ";:gosub5310:c=val(in$):j=b-a:ifj<1then50
  135. 188 print"destination block ";:gosub5310:b=val(in$):print"ending voice ";:gosub5310
  136. 189 r=val(in$):ifc=1thenqq=6*4096:goto191
  137. 190 qq=8*4096
  138. 191 r=8*4096:ifr=1thenr=6*4096
  139. 193 fori=qq+a*3-3toqq+a*3-3+j*3+2:poker+b*3-3,peek(i):r=r+1:next
  140. 194 goto50
  141. 195 ifa$<>"x"then197
  142. 196 sys5*4096+9*256+15*16+10:poke54296,0:p=0:printq$chr$(9)"[145][145]":goto20000
  143. 197 ifa$<>"s"then210
  144. 198 print"[147]starting block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  145. 199 b=val(in$):print"voice ";:gosub5310:c=val(in$):ifb-a<1then50
  146. 200 ifc=1orc=2then202
  147. 201 goto50
  148. 202 qq=8*4096:ifc=1thenqq=6*4096
  149. 204 r=qq+a*3-3:qq=r+b*3:lo=12*4096+22:pokelo+1,int(r/256)
  150. 205 pokelo,r-(int(r/256))*256:pokelo+3,int(qq/256):pokelo+2,qq-(int(qq/256))*256
  151. 206 print"file name ? ";:gosub5310:lo=lo-16:iflen(in$)=0thendv=1:goto208
  152. 207 fori=1tolen(in$):pokelo+i-1,asc(mid$(in$,i,1)):next:dv=1
  153. 208 pokelo-1,len(in$):print"disk or tape?";:gosub5310:ifleft$(in$,1)="d"thendv=8
  154. 209 poke5*4096+10*256+10,dv:sys5*4096+10*256+7:goto50
  155. 210 ifa$<>"f"then230
  156. 211 print"[147]starting block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  157. 212 b=val(in$):b=b-a:ifb<1then50
  158. 213 print"voice ";:gosub5310:c=val(in$):ifc=1thenc=6*4096:goto215
  159. 214 c=8*4096
  160. 215 qw=c:a=c+a*3-3:lo=12*4096+32-1:c=1
  161. 216 print"member"c;:gosub5310;:ifval(in$)=0then220
  162. 217 ifval(in$)<0orval(in$)>255then216
  163. 218 pokec+lo,val(in$):c=c+1:goto216
  164. 220 c=c-1:print"searching for ";:fori=1toc:printpeek(lo+i);:next:print
  165. 221 foi=atoa+b*3:forj=1toc:ifpeek(i+j-1)=peek(lo+j)thennext:goto223
  166. 222 j=c+1:next:goto224
  167. 223 qq=(int((i-qw)/3))+1:print"block"qq"position"qq*3-(int((i-qw)/(qq*3))+1)
  168. 224 next:print"hit a key to continue."
  169. 225 getr$:ifr$=""then225
  170. 226 goto50
  171. 230 ifa$<>"e"then500
  172. 231 printq$"what position ";:gosub5310:a=val(in$):print"what value ";:gosub5310
  173. 232 b=val(in$):ifb>255ora<0then50
  174. 233 poke6*4096+a-1,b:goto50
  175. 240 print"[147]blocks free";int(f2/3);"    :  :";
  176. 242 print"      voice 2":sysc2
  177. 243 print"position"tab(16)n2;tab(22)n2+1;tab(28)n2+2
  178. 245 print"values"tab(16)peek(n2+v2)"  "peek(n2+v2+1)"  "peek(n2+v2+2)
  179. 248 print"meaning"tab(10);:a=peek(n2+v2):b=peek(n2+v2+1):c=peek(n2+v2+2)
  180. 250 ifa=0thenprint"at/dec ="b"sus/rel ="c:goto280
  181. 253 j=0:fori=1to15:ifa=nu(i)thenj=i
  182. 254 next:ifj=0thenprintl$(0)a;:goto260
  183. 256 z=int(j/3):y=j-z*3:ifythenz=z+1
  184. 257 ify=1thenprints$;
  185. 258 ify=0thenprintl$;
  186. 259 printl$(z)" ";
  187. 260 rem
  188. 261 j=b*256+c:fori=1to12:ifj=o1%(i)thena=1:b=i:goto270
  189. 262 ifj=o2%(i)thena=2:b=i:goto270
  190. 263 ifj=o3%(i)thena=3:b=i:goto270
  191. 264 ifj=o4%(i)thena=4:b=i:goto270
  192. 265 ifj=o5%(i)thena=5:b=i:goto270
  193. 266 ifj=o6%(i)thena=6:b=i:goto270
  194. 267 ifj=o7%(i)thena=7:b=i:goto270
  195. 268 ifj=o8(i)thena=8:b=i:goto270
  196. 269 next:ifj>0thenprint" ? note":goto280
  197. 270 i=13:ifj=0thenprint" rest":goto280
  198. 272 next:printa;:in$=ns$(b):a$=nf$(b):ifa$=in$thenprinta$:goto280
  199. 274 printin$" ("a$")"
  200. 280 print""
  201. 282 print"l[146]=load s[146]=save g[146]=goto n[146]=next b[146]=back e[146]=edt";
  202. 284 print"c[146]=change p[146]=play t[146]=transfer f[146]=find ?[146]=dump"
  203. 285 print"h[146]=help z[146]=speed v[146]=volume e[146]=edit"
  204. 286 print"current block ="b2
  205. 288 print"octave "o2"   tempo "t2"   speed "sp
  206. 290 a$="":print"input : ";:h=.:gosub5310:h=1:a$=in$
  207. 291 ifleft$(a$,1)="h"ora$="*h"thengosub7000:goto50
  208. 292 ifleft$(a$,1)="*"then321
  209. 293 a=val(left$(a$,1)):ifathengosub422:o2=a:goto296
  210. 294 b$=left$(a$,2):ifright$(b$,1)=" "thenb$=left$(b$,1)
  211. 295 goto297
  212. 296 b$=mid$(a$,2,2):ifright$(b$,1)=" "thenb$=left$(b$,1)
  213. 297 j=0:fori=1to12:ifb$=ns$(i)thenj=i
  214. 298 next:ifjthen302
  215. 299 j=0:fori=1to12:ifb$=nf$(i)thenj=i
  216. 300 next:ifjthen302
  217. 301 goto1402
  218. 302 ono2gosub400,410,420,430,440,450,460,470
  219. 303 b=int(a/256):c=a-b*256:pokev2+n2+1,b:pokev2+n2+2,c
  220. 304 j=0:fori=1tolen(a$):ifmid$(a$,i,1)=" "thenj=i
  221. 305 next:a$=right$(a$,len(a$)-j):j=0:fori=1to15:ifa$=n$(i)thenj=i
  222. 306 next:ifj=0thend=val(a$):goto308
  223. 307 d=nu(j):goto310
  224. 308 ifd>255thenprintq$;"duration too large !!":gosub8000:goto50
  225. 309 ifd<=0thenprintq$;"duration can't be less than 1 !!":gosub8000:goto50
  226. 310 d=d+t2:ifd>255ord<=0then308
  227. 311 poken2+v2,d:b2=b2+1:n2=n2+3:f2=f2-3
  228. 312 iff2<1thenprintq$"all blocks full for voice 1":gosub8000:goto1426
  229. 313 ifright$(a$,1)="h"orright$(a$,2)="h "then1461
  230. 314 ifval(a$)then318
  231. 315 ifright$(a$,1)="s"orright$(a$,2)="s "then1471
  232. 316 poken2+v2,1:poken2+v2+1,0:poken2+v2+2,0:goto320
  233. 317 poken2+v2+2,0:goto320
  234. 318 ifa2=0then50
  235. 319 poken2+v2,a2:poken2+v2+1,0:goto317
  236. 320 b2=b2+1:n2=n2+3:f2=f2-3:goto1424
  237. 321 a$=right$(a$,1):ifa$<>"g"then324
  238. 322 printq$"to what block ? ";:gosub5310:j=val(in$):ifj>2830orj<1then50
  239. 323 b2=j:f2=8193-b2*3:n2=b2*3-2:goto50
  240. 324 ifa$<>"n"then327
  241. 325 j=b2:j=j+1:ifj<2831then323
  242. 326 goto50
  243. 327 ifa$<>"b"then330
  244. 328 j=b2:j=j-1:ifj>0then323
  245. 329 goto50
  246. 330 ifa$<>"l"then332
  247. 331 goto4000
  248. 332 ifa$<>"p"then345
  249. 333 ifp=1thensys5*4096+9*256+15*16+10:poke54296,0:p=0:goto50
  250. 334 print"[147]which voices do you want ? (1/2/b) ";:gosub5310:a$=in$
  251. 335 qq=5*4096+9*256:ifa$="2"thenpokeqq+68,0:pokeqq+109,0:pokeqq+21,0:goto340
  252. 336 print"what waveform for voice 1 ? (t/s/p/n) ";:gosub5310:a1=1:gosub433
  253. 337 pokeqq+68,wv:pokeqq+109,wv:pokeqq+21,wv-1
  254. 338 print"what block does it start at ? ";:gosub5310:vv=1:gosub452
  255. 339 ifa$="1"thensysqq+12*16:p=1:pokeqq+114,0:pokeqq+85,0:goto50
  256. 340 print"what waveform for voice 2 ? (t/s/p/n) ";:gosub5310:a1=2:gosub433
  257. 341 pokeqq+114,wv:pokeqq+85,wv-1
  258. 342 print"what block does it start at ? ";:gosub5310:vv=2:gosub452
  259. 343 sysqq+12*16:p=1:goto50
  260. 345 ifa$<>"c"then365
  261. 346 print"[147]your choice ? (v/t/dsr/au/ti/fs/x) ";:gosub5310:ifin$="x"then50
  262. 347 ifin$="t"thenprint"tempo";:gosub5310:t2=val(in$):goto346
  263. 348 ifin$="dsr"thenprint"attack/decay ? ";:gosub5310:a=val(in$):goto350
  264. 349 goto352
  265. 350 print"sustain/release ? ";:gosub5310:sr=val(in$):ifa>255orsr>255then346
  266. 351 poken2+v2,0:poken2+v2+1,a:poken2+v2+2,sr:b2=b2+1:n2=n2+3:f2=f2-3:goto346
  267. 352 ifin$="v"thenv=v+1:v=v+2*(v=3):goto346
  268. 353 ifin$="au"thenprint"your new seperatioin ? ";:gosub5310:a2=val(in$):goto346
  269. 354 ifin$<>"fs"then1473
  270. 355 print"[147]starting block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  271. 356 j=val(in$)-a:ifa<1then346
  272. 357 print"slower or faster ? (s/f) ";:gosub5310:ifin$="s"thenr=2:k=1:goto359
  273. 358 r=.5:k=0
  274. 359 qq=8*4096+a*3-3:fori=qqtoqq+j*3step3:ifpeek(i)<2then362
  275. 360 a=int(peek(i)*r)+k:ifa>255thena=255
  276. 361 pokei,a
  277. 362 next:goto346
  278. 365 ifa$<>"t"then375
  279. 366 print"[147]beginning block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  280. 367 b=val(in$):print"origin voice ";:gosub5310:c=val(in$):j=b-a:ifj<1then50
  281. 368 print"destination block ";:gosub5310:b=val(in$):print"ending voice ";:gosub5310
  282. 369 r=val(in$):ifc=1thenqq=6*4096:goto191
  283. 370 qq=8*4096
  284. 371 ifr=1thenr=6*4096:goto193
  285. 372 r=8*4096
  286. 373 fori=qq+a*3-3toqq+a*3-3+j*3+2:poker+b*3-3,peek(i):r=r+1:next
  287. 374 goto50
  288. 375 ifa$<>"x"then377
  289. 376 sys5*4096+9*256+15*16+10:poke54296,0:p=0:printq$chr$(9)"[145][145]":goto20000
  290. 377 ifa$="s"then198
  291. 390 ifa$<>"f"then2410
  292. 391 print"[147]starting block ";:gosub5310:a=val(in$):print"ending block ";:gosub5310
  293. 392 b=val(in$):b=b-a:ifb<1then50
  294. 393 print"voice ";:gosub5310:c=val(in$):ifc=1thenc=6*4096:goto395
  295. 394 c=8*4096
  296. 395 qw=c:a=c+a*3-3:lo=12*4096+32-1:c=1
  297. 396 print"member"c;:gosub5310;:ifval(in$)=0then2400
  298. 397 ifval(in$)<0orval(in$)>255then396
  299. 398 pokec+lo,val(in$):c=c+1:goto396
  300. 400 a=o1%(j):return
  301. 402 ifleft$(a$,1)="r"thena=0:goto123
  302. 403 printq$"improper note !!":gosub8000:goto50
  303. 410 a=o2%(j):return
  304. 420 a=o3%(j):return
  305. 422 ifa=9thena=8
  306. 423 return
  307. 424 iff1<0thenprintq$"all blocks full for voice 1":gosub8000:goto426
  308. 425 goto50
  309. 426 b1=b1-1:n=n-3:f1=f1+3:goto50
  310. 430 a=o4%(j):return
  311. 433 ifin$="s"thenwv=33:return
  312. 434 ifin$="n"thenwv=129:return
  313. 435 ifin$<>"p"then439
  314. 436 print"[147]low pulse (0-255) ?[160]";:gosub5310:a=val(in$):print"high pulse (0-15) ? ";
  315. 437 gosub5310:wv=65:b=val(in$):ifa<0ora>255thena=127
  316. 438 goto456
  317. 439 wv=17:return
  318. 440 a=o5%(j):return
  319. 450 a=o6%(j):return
  320. 452 lo=val(in$):iflo<1orlo>2730thenlo=1
  321. 453 ifvv=2then455
  322. 454 a=6*4096+(lo*3-3):pokeqq+216,a-(int(a/256))*256:pokeqq+255,int(a/256):return
  323. 455 a=8*4096+(lo*3-3):pokeqq+221,a-(int(a/256))*256:pokeqq+229,int(a/256):return
  324. 456 ifb<0orb>15thenb=7
  325. 457 ifa1=1thenpoke54274,a:poke54275,b:return
  326. 459 poke54281,a:poke54282,b:return
  327. 460 a=o7%(j):return
  328. 461 b$=right$(a$,2):ifleft$(b$,1)=" "ora$="h"then134
  329. 462 goto50
  330. 470 a=o8(j):return
  331. 471 b$=right$(a$,2):ifleft$(b$,1)=" "ora$="s"then136
  332. 472 poken+v1,2:poken+v1+1,0:goto137
  333. 473 ifin$<>"ti"then166
  334. 474 print"[147]clock 1 equal ";:gosub5310:ifval(in$)=0then480
  335. 475 a=len(in$):ifa>6orin$=""then166
  336. 476 ifa<>6thenfori=1to6-a:in$="0"+in$:next
  337. 477 te=val(left$(in$,1))*16+val(mid$(in$,2,1))*16:ifte<256thenpoke56331,te
  338. 478 te=val(mid$(in$,4,1))+val(mid$(in$,3,1))*16:ifte<256thenpoke56330,te
  339. 479 te=val(right$(in$,1))+val(mid$(in$,5,1))*16:ifte<256thenpoke56329,te:goto481
  340. 480 fori=56331to56329step-1:pokei,0:next
  341. 481 print"[147]clock 2 equal ";:gosub5310:ifval(in$)=0then490
  342. 482 a=len(in$):ifa>6orin$=""then50
  343. 483 ifa<>6thenfori=1to6-a:in$="0"+in$:next
  344. 484 te=val(left$(in$,1))*16+val(mid$(in$,2,1))*16:ifte<256thenpoke56587,te
  345. 485 te=val(mid$(in$,4,1))+val(mid$(in$,3,1))*16:ifte<256thenpoke56586,te
  346. 486 te=val(right$(in$,1))+val(mid$(in$,5,1))*16:poke56585,te:poke56584,0:poke56328,0:goto50
  347. 490 fori=56587to56584step-1:pokei,0:next:poke56328,0:goto50
  348. 500 ifa$="v"then550
  349. 505 ifa$="?"then49000
  350. 510 ifa$<>"z"then50
  351. 511 print"[147]new speed ? ";:gosub5310:a=val(in$):ifa<1ora>255then50
  352. 512 poke56325,a:sp=a:goto50
  353. 550 print"[147]filter voice 1?(y/n)";:gosub5310:vw=0:ifleft$(in$,1)="y"thenvw=1
  354. 552 print"filter voice 2 ? (y/n) ";:gosub5310:ifleft$(in$,1)="y"thenvw=vw+2
  355. 556 print"resonance? (0-15) ";:gosub5310:in=int(val(in$)):ifin<0orin>15thenin=0
  356. 558 poke54295,vw+in*16:print"[147]want hi-pass filter ? (y/n) ";:gosub5310
  357. 560 vw=0:ifleft$(in$,1)="y"thenvw=64
  358. 562 print"want band-pass filter? (y/n) ";:gosub5310:ifleft$(in$,1)="y"thenvw=vw+32
  359. 564 print"want low-pass filter ? (y/n) ";:gosub5310:ifleft$(in$,1)="y"thenvw=vw+16
  360. 566 print"what volume ? (0-15) ";:gosub5310:in=int(val(in$)):ifin<0orin>15thenin=7
  361. 568 in=vw+in:print"[147]what high setting ? (0-15) ";:gosub5310:vw=int(val(in$))
  362. 570 ifvw<0orvw>15thenvw=0
  363. 572 print"what low setting ? (0-255) ";:gosub5310:vw=int(val(in$))
  364. 574 ifvw<0orvw>255thenvw=0
  365. 576 poke54294,vw:poke54296,in:goto50
  366. 1000 datass,s,sh,es,e,eh,qs,q,qh,hs,h,hh,ws,w,wh,sixteenth,eighth,quarter,half
  367. 1001 datawhole
  368. 1005 datac,c#,d,d#,e,f,f#,g,g#,a,a#,b
  369. 1007 datac,db,d,eb,e,f,gb,g,ab,a,bb,b
  370. 1009 data6,7,8,14,15,16,30,31,32,62,63,64,126,127,128
  371. 1010 data268,284,301,318,337,358,379,401,425,451,477,506
  372. 1012 data536,568,602,637,675,716,758,803,851,902,955,1012
  373. 1014 data1072,1136,1204,1275,1351,1432,1517,1607,1703,1804,1911,2025
  374. 1016 data2145,2273,2408,2551,2703,2864,3034,3215,3406,3608,3823,4050
  375. 1018 data4291,4547,4817,5103,5407,5728,6069,6430,6812,7217,7647,8101
  376. 1020 data8583,9094,9634,10207,10814,11457,12139,12860,13625,14435,15294,16203
  377. 1022 data17167,18188,19269,20415,21629,22915,24278,25721,27251,28871,30588,32407
  378. 1024 data34334,36367,38539,40830,43258,45830,48556,51443,54502,57743,61776,64814
  379. 1200 data174,0,192,236,1,192,240,7,232,142,0,192,76,59,89,160,0,140
  380. 1201 data0,192,169,32,141,4,212,177,251,141,1,192,240,104,200,177,251,141
  381. 1202 data1,212,200,177,251,141,0,212,24,165,251,105,3,133,251,144,6,165
  382. 1203 data252,105,0,133,252,174,2,192,236,3,192,240,12,169,33,141,4,212
  383. 1204 data232,142,2,192,76,49,234,160,0,140,2,192,169,32,141,11,212,177
  384. 1205 data253,141,3,192,240,68,200,177,253,141,8,212,200,177,253,141,7,212
  385. 1206 data169,33,141,4,212,169,33,141,11,212,24,165,253,105,3,133,253,144
  386. 1207 data6,165,254,105,0,133,254,76,49,234,200,177,251,141,5,212,200,177
  387. 1208 data251,141,6,212,24,165,251,105,3,133,251,165,252,105,0,133,252,76
  388. 1209 data15,89,200,177,253,141,12,212,200,177,253,141,13,212,24,165,253,105
  389. 1210 data3,133,253,165,254,105,0,133,254,76,79,89,169,0,141,0,192,141
  390. 1211 data1,192,141,2,192,141,3,192,168,153,0,212,200,192,2,208,248,169
  391. 1212 data0,234,133,251,169,0,133,253,169,96,133,252,169,128,133,254,169,15
  392. 1213 data141,24,212,120,169,0,141,20,3,169,89,141,21,3,88,96,120,169
  393. 1214 data49,141,20,3,169,234,141,21,3,88,96,169,1,162,1,160,255,32
  394. 1215 data186,255,173,5,192,162,6,160,192,32,189,255,173,22,192,133,249,173
  395. 1216 data23,192,133,250,174,24,192,172,25,192,169,249,32,216,255,96,56,32
  396. 1217 data240,255,142,48,192,140,49,192,96,24,172,49,192,174,48,192,32,240
  397. 1218 data255,96,169,0,160,3,153,8,220,153,8,221,136,16,247,96,160,7
  398. 1219 data162,0,189,9,220,24,41,15,105,48,153,19,4,24,189,9,220,74
  399. 1220 data74,74,74,24,105,48,136,153,19,4,136,136,232,224,3,208,223,173
  400. 1221 data11,220,96,160,7,162,0,189,9,221,24,41,15,105,48,153,19,4
  401. 1222 data24,189,9,221,74,74,74,74,24,105,48,136,153,19,4,136,136,232
  402. 1223 data224,3,208,223,173,8,221,96
  403. 1402 ifleft$(a$,1)="r"thena=0:goto303
  404. 1403 printq$"improper not !!":gosub8000:goto50
  405. 1424 iff2<0thenprintq$"all blocks full for voice 1":gosub8000:goto426
  406. 1425 goto50
  407. 1426 b2=b2-1:n2=n2-3:f2=f2+3:goto50
  408. 1461 b$=right$(a$,2):ifleft$(b$,1)=" "ora$="h"then314
  409. 1462 goto50
  410. 1471 b$=right$(a$,2):ifleft$(b$,1)=" "ora$="s"then316
  411. 1472 poken2+v2,2:poken2+v2+1,0:goto317
  412. 1473 ifin$<>"ti"then346
  413. 1474 print"clock 1 equal ";:gosub5310:ifval(in$)=0then480
  414. 1475 a=len(in$):ifa>6orin$""then346
  415. 1476 goto476
  416. 2400 c=c-1:print"searching for ";:fori=1toc:printpeek(lo+i);:next:print
  417. 2401 fori=atoa+b*3:forj=1toc:ifpeek(i+j-1)=peek(lo+j)thennext:goto2403
  418. 2402 j=c+1:next:goto2404
  419. 2403 qq=(int((i-qw)/3))+1:print"block"qq"position"qq*3-(int((i-qw)/(qq*3))+1)
  420. 2404 next:print"hit a key to continue."
  421. 2405 getr$:ifr$=""then2405
  422. 2406 goto50
  423. 2410 ifa$<>"e"then500
  424. 2411 printq$"what position ";:gosub5310:a=val(in$):print"what value ";:gosub5310
  425. 2412 b=val(in$):ifb>255ora<0then50
  426. 2413 poke8*4096+a-1,b:goto50
  427. 4000 d=1:printq$"disk or tape ? (d/t) ";:gosub5310:ifleft$(in$,1)="d"thend=8
  428. 4005 printq$"name of file ?         [157][157][157][157][157][157][157][157]";:gosub5310:qq=1:loadin$,d,1
  429. 5310 in$=" ":l=1:zd$=chr$(20):cr$=chr$(13):w=646:i=1:g=15:n$="[157]":x=3:b$="zqw*"
  430. 5320 getz$:ifz$<>""then5350
  431. 5321 ifhthen5330
  432. 5322 ifv=2thenq=f1:f1=f2:te=c1:c1=c2
  433. 5323 syssy:print"blocks free"int(f1/x)"::"
  434. 5324 sysys:sysc1
  435. 5325 ifv=2thenf1=q:c1=te
  436. 5330 pokew,int(rnd(.)*g)+i:printmid$(b$,l,i)n$;:l=(xandl)+i:goto5320
  437. 5350 zi=asc(z$):zl=len(in$):if(ziand127)<32thenprint" [157]";:goto5380
  438. 5360 ifzl>15then5320
  439. 5370 in$=in$+z$:printz$;zd$;z$;
  440. 5380 ifzi=13thenin$=mid$(in$,2):y$=left$(in$,1):printcr$;:return
  441. 5390 ifzi=20andzl>1thenin$=left$(in$,zl-1):print"[157]";:goto5320
  442. 5400 ifzi=133thenz$=chr$(-20*(zl>1)):forzi=2tozl:printz$;:nextzi:goto5310
  443. 5410 goto5320
  444. 7000 print"[147]complete command listing"
  445. 7001 print"########################"
  446. 7002 print"*s = saves a file to disk
  447. 7003 [153]"*l = loads a file from disk
  448. 7004 print"*g = goto a specified block (note)
  449. 7005 [153]"*n = goto next block (note)
  450. 7006 print"*b = goto previous block (note)
  451. 7007 [153]"*e = edit specific single value
  452. 7008 print"*c = alter one of many editor values
  453. 7009 [153]"  v = voice  t = tempo  dsr = adsr vals"
  454. 7010 [153]"  au = auto durations  ti = set time"
  455. 7011 [153]"  fs = faster/slower  x = back to editor"
  456. 7012 [153]"hit 'f1' to continue...."
  457. 7013 [161]r$:[139]r$[178]""[167]7013
  458. 7014 [139]r$[179][177]"input"[167]50
  459. 7015 [153]"load*? = dump music listings to printer"
  460. 7017 [153]"*p = play one or both voices"
  461. 7018 [153]"*t = transfer sections of music"
  462. 7019 [153]"*f = find a certain number of values"
  463. 7020 [153]"*x = leave program and save ml
  464. 7021 print"*h = command listing
  465. 7022 [153]"*v = change sid-chip settings"
  466. 7023 [153]"*s = change speed setting"
  467. 7025 [153]"enter octave, note, a space, then
  468. 7026 print"duration to directly enter music.
  469. 7027 [153]"use a '*' only for a command.
  470. 7028 print"hit a key to continue.
  471. 7029 [161]r$:[139]r$[178]""[167]7029
  472. 7030 [137]50
  473. 8000 [129]i[178]1[164]2500:[130]:[142]
  474. 10000 [153]"load   c-64 interrupt music maker/editor"
  475. 10002 [153]"           version 1.09/01/83"
  476. 10003 [153]"              by pete lobl"
  477. 10004 [129]i[178]1[164]1000:[130]:[151]198,0:[142]
  478. 20000 [153]"loadtape or disk ?(t/d) ";:[141]5310:dv[178]8:[139][200](in$,1)[178]"t"[167]dv[178]1
  479. 20204 r[178]22784:qq[178]23206:lo[178]12[172]4096[170]22:[151]lo[170]1,[181](r[173]256)
  480. 20205 [151]lo,r[171]([181](r[173]256))[172]256:[151]lo[170]3,[181](qq[173]256):[151]lo[170]2,qq[171]([181](qq[173]256))[172]256
  481. 20206 [153]"ml file name ? ";:[141]5310:lo[178]lo[171]16:[139][195](in$)[178]0[167]20208
  482. 20207 [129]i[178]1[164][195](in$):[151]lo[170]i[171]1,[198]([202](in$,i,1)):[130]
  483. 20208 [151]lo[171]1,[195](in$):[139][195](in$)[178]0[175]dv[178]8[167][153]"missing file name !!":[137]20300
  484. 20209 [151]5[172]4096[170]10[172]256[170]10,dv:[158]5[172]4096[170]10[172]256[170]7
  485. 20300 [153]"take it easy, hope you had fun !!":[128]
  486. 49000 [153]"loadwhat voice ? (1/2) ";:[141]5310:in[178][181]([197](in$)):[139]in[179]1[175]in[177]2[167]50
  487. 49010 tv[178]in:z[178]6[172]4096:[139]in[178]2[167]z[178]8[172]4096
  488. 49020 [153]"starting block? ";:[141]5310:in[178][181]([197](in$)):[139]in[179]0[175]in[177]1730[167]50
  489. 49030 bb[178]in
  490. 49040 vi[178]3[172]in:[153]"ending block?";:[141]5310:in[178][181]([197](in$)):[139]in[179]0[175]in[177]1730[167]50
  491. 49050 eb[178]in:en[178]3[172]in[170]z:z[178]vi[170]z:[139]z[177]en[167]50
  492. 49100 [159]4,4:[153]#4,[199](10)"interrupt music editor printout. (c) 1983 pete lobl"
  493. 49200 [152]4,[199](10)"voice"tv"beginning block"bb"ending block"eb
  494. 49210 [152]4,[199](10)
  495. 50000 a[178][194](z):b[178][194](z[170]1):c[178][194](z[170]2)
  496. 50020 [152]4,"block"bb;
  497. 50060 [139]a[178]0[167][152]4,"at/dec ="b"sus/rel ="c:[137]50100
  498. 50080 [152]4,"duration"a;
  499. 50081 j[178]b[172]256[170]c:[129]i[178]1[164]12:[139]j[178]o1%(i)[167]a[178]1:b[178]i:[137]50090
  500. 50082 [139]j[178]o2%(i)[167]a[178]2:b[178]i:[137]50090
  501. 50083 [139]j[178]o3%(i)[167]a[178]3:b[178]i:[137]50090
  502. 50084 [139]j[178]o4%(i)[167]a[178]4:b[178]i:[137]50090
  503. 50085 [139]j[178]o5%(i)[167]a[178]5:b[178]i:[137]50090
  504. 50086 [139]j[178]o6%(i)[167]a[178]6:b[178]i:[137]50090
  505. 50087 [139]j[178]o7%(i)[167]a[178]7:b[178]i:[137]50090
  506. 50088 [139]j[178]o8(i)[167]a[178]8:b[178]i:[137]50090
  507. 50089 [130]:[139]j[177]0[167][152]4," ? note":[137]50100
  508. 50090 i[178]13:[139]j[178]0[167][152]4," rest":[137]50100
  509. 50092 [130]:[152]4,a;:in$[178]ns$(b):a$[178]nf$(b):[139]a$[178]in$[167][152]4,a$:[137]50100
  510. 50094 [152]4,in$" ("a$")"
  511. 50100 bb[178]bb[170]1:[139]bb[177]eb[167][153]#4,[199](10)"printing complete."[199]10):[160]4:[137]50
  512. 50110 z[178]z[170]3:[137]50000
  513.